'use strict';

module.exports = app => {
  const { STRING, UUID, UUIDV4, INTEGER } = app.Sequelize;

  const model = app.model.define('role', {
    id: {
      type: UUID,
      defaultValue: UUIDV4,
      primaryKey: true,
      comment: '主键 角色id',
    },
    role_name: {
      type: STRING,
      allowNull: false,
      comment: '角色名称',
    },
  }, {
    tableName: 'role',
    comment: '角色表',
  });

  return model;
};
